#ifndef file_config_game_h
#define file_config_game_h

#import "head.h"

/*object config
*/
extern UICenterRect g_CfgGameElementArea;
extern UICenterRect g_CfgGameScrrenArea[20];
extern CGPoint g_CfgGameBowBase;
extern UICenterRect g_CfgGameArrowValidArea;
extern float g_CfgGameArrowLevelUpHoldTime;
extern float g_CfgGameArrowCoolDownTime;
extern CGSize g_CfgGameParabolaTouch;
extern UICenterRect g_CfgGameLinearTouch;

extern CGPoint g_CfgGameItem1HolderPosition;
extern CGPoint g_CfgGameItem2HolderPosition;

extern CGPoint g_CfgGameBridgePosition;
extern CGSize g_CfgGameBridgeSize;
extern CGPoint g_CfgGameBridgeArcLeft;
extern CGPoint g_CfgGameBridgeArcRight;
extern CGPoint g_CfgGameBridgeArcTop;
extern char g_CfgGameImageBridgePath[STRING_BUF_SIZE];
extern char g_CfgGameImageBridgeRedPath[STRING_BUF_SIZE];
extern char g_CfgGameImageBridgeCloudPath[STRING_BUF_SIZE];
extern char g_CfgGameImageBridgeBoyPath[STRING_BUF_SIZE];
extern char g_CfgGameImageBridgeGirdPath[STRING_BUF_SIZE];
extern UIAnimationObject g_CfgGameAniBridgeCover;

extern CGPoint g_CfgGameTimeBarPosition;

/*menu config
*/
extern UIImageObject g_CfgGameMenuBackgroundWin;
extern UIImageObject g_CfgGameMenuBackgroundLose;

extern UIImageObject g_CfgGameMenuImagePause;
extern CGPoint g_CfgGameMenuTitlePosition;

extern char g_CfgGameMenuStarOn[STRING_BUF_SIZE];
extern char g_CfgGameMenuStarOff[STRING_BUF_SIZE];

extern CGPoint g_CfgGameMenuStarHeartPosition;
extern CGPoint g_CfgGameMenuStarEnemyPosition;
extern CGPoint g_CfgGameMenuStarSpecialPosition;
extern CGPoint g_CfgGameMenuTextHeartPosition;
extern CGPoint g_CfgGameMenuTextEnemyPosition;
extern CGPoint g_CfgGameMenuTextSpecialPosition;

extern UIMenuItemImageObject g_CfgGameMenuItemResume;
extern UIMenuItemImageObject g_CfgGameMenuItemRestart;
extern UIMenuItemImageObject g_CfgGameMenuItemQuit;
extern UIMenuItemImageObject g_CfgGameMenuItemRetry;
extern UIMenuItemImageObject g_CfgGameMenuItemNext;
extern UIMenuItemImageObject g_CfgGameMenuItemBackMenu;

/*background config
*/
extern char g_CfgGameBg0ImagePath[STRING_BUF_SIZE];

extern ccColor3B g_CfgGameBg1BackColor;
extern char g_CfgGameBg1ImageStar1Path[STRING_BUF_SIZE];
extern char g_CfgGameBg1ImageStar2Path[STRING_BUF_SIZE];
extern char g_CfgGameBg1ImageMoonPath[STRING_BUF_SIZE];
extern char g_CfgGameBg1ImageCloud[STRING_BUF_SIZE];
extern char g_CfgGameBg1ImageCastle[STRING_BUF_SIZE];
extern int g_CfgGameBg1StarStartY;
extern int g_CfgGameBg1StarEndY;
extern int g_CfgGameBg1MoonStartY;
extern int g_CfgGameBg1MoonEndY;
extern int g_CfgGameBg1CloudStartY;
extern int g_CfgGameBg1CloudEndY;
extern int g_CfgGameBg1CastleStartY;
extern int g_CfgGameBg1CastleEndY;

extern ccColor3B g_CfgGameBg2BackColor;
extern char g_CfgGameBg2ImageCloudPath[STRING_BUF_SIZE];
extern char g_CfgGameBg2ImageHillPath[STRING_BUF_SIZE];
extern int g_CfgGameBg2CloudStartY;
extern int g_CfgGameBg2CloudEndY;
extern int g_CfgGameBg2HillStartY;
extern int g_CfgGameBg2HillEndY;

extern char g_CfgGameBg3ImageBackPath[STRING_BUF_SIZE];
extern char g_CfgGameBg3ImageUpLeftPath[STRING_BUF_SIZE];
extern char g_CfgGameBg3ImageUpRightPath[STRING_BUF_SIZE];
extern char g_CfgGameBg3ImageDonwPath[STRING_BUF_SIZE];
extern char g_CfgGameBg3ImageMiddlePath[STRING_BUF_SIZE];
extern char g_CfgGameBg3ImageMiddleEffectPath[STRING_BUF_SIZE];
extern CGPoint g_CfgGameBg3UpLeftStartPosition;
extern CGPoint g_CfgGameBg3UpLeftEndPosition;
extern CGPoint g_CfgGameBg3UpRightStartPosition;
extern CGPoint g_CfgGameBg3UpRightEndPosition;
extern CGPoint g_CfgGameBg3DownStartPosition;
extern CGPoint g_CfgGameBg3DownEndPosition;
extern CGPoint g_CfgGameBg3MiddleStartPosition;
extern CGPoint g_CfgGameBg3MiddleEndPositio;
extern CGPoint g_CfgGameBg3MiddleEffectStartPosition;
extern CGPoint g_CfgGameBg3MiddleEffectEndPosition;

/*resource config table
*/
extern SBaseDataBow g_CfgGameBowDataTable[BOW_TYPE_COUNT];
extern SBaseDataArrow g_CfgGameArrowDataTable[ARROW_TYPE_COUNT];
extern SBaseDataEnemy g_CfgGameEnemyDataTable[ENEMY_TYPE_COUNT];
extern SBaseDataBoss1 g_CfgGameBoss1Data;
extern SBaseDataBoss2 g_CfgGameBoss2Data;
extern SBaseDataBoss3 g_CfgGameBoss3Data;
extern SBaseDataBomb g_CfgGameBombDataTable[BOMB_TYPE_COUNT];
extern SBaseDataSwirl g_CfgGameSwirlDataTable[SWIRL_TYPE_COUNT];
extern SBaseDataHeart g_CfgGameHeartData;

void CfgGameSystemInit(void);
void CfgGameSystemFree(void);

void CfgGameLoadConfigFile(void);

CGPoint CfgGameGetPointCGPoint(int AreaIndex);
b2Vec2 CfgGameGetPointb2Vec2(int AreaIndex);
int CfgGameGetAreaIndex(CGPoint Position);

#endif